.class public abstract Lcom/instagram/creation/base/f;
.super Ljava/lang/Object;
.source "IgFilter.java"


# static fields
.field private static final RES_NAME_FMT:Ljava/lang/String; = "camera_edit_filter_%s"

.field private static final sResIdCache:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private mId:I

.field private mName:Ljava/lang/String;

.field private mResInfix:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 17
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/instagram/creation/base/f;->sResIdCache:Ljava/util/Map;

    return-void
.end method

.method public constructor <init>(ILjava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 24
    iput p1, p0, Lcom/instagram/creation/base/f;->mId:I

    .line 25
    iput-object p2, p0, Lcom/instagram/creation/base/f;->mName:Ljava/lang/String;

    .line 26
    iput-object p3, p0, Lcom/instagram/creation/base/f;->mResInfix:Ljava/lang/String;

    .line 27
    return-void
.end method


# virtual methods
.method public getId()I
    .locals 1

    .prologue
    .line 34
    iget v0, p0, Lcom/instagram/creation/base/f;->mId:I

    return v0
.end method

.method public getName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 30
    iget-object v0, p0, Lcom/instagram/creation/base/f;->mName:Ljava/lang/String;

    return-object v0
.end method

.method public getResId(Landroid/content/Context;)I
    .locals 6
    .parameter "context"

    .prologue
    .line 42
    invoke-virtual {p0}, Lcom/instagram/creation/base/f;->getResInfix()Ljava/lang/String;

    move-result-object v1

    .line 45
    sget-object v0, Lcom/instagram/creation/base/f;->sResIdCache:Ljava/util/Map;

    invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 46
    sget-object v0, Lcom/instagram/creation/base/f;->sResIdCache:Ljava/util/Map;

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 56
    :goto_0
    return v0

    .line 48
    :cond_0
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 49
    const-string v2, "camera_edit_filter_%s"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    invoke-virtual {p0}, Lcom/instagram/creation/base/f;->getResInfix()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Lcom/instagram/n/i;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    .line 51
    const-string v3, "drawable"

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v2, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 53
    sget-object v2, Lcom/instagram/creation/base/f;->sResIdCache:Ljava/util/Map;

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0
.end method

.method public getResInfix()Ljava/lang/String;
    .locals 1

    .prologue
    .line 38
    iget-object v0, p0, Lcom/instagram/creation/base/f;->mResInfix:Ljava/lang/String;

    return-object v0
.end method
